Skip to content

FIX: Deployed Matlab applications must not call addpath() #3509

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 20, 2022

Conversation

DimitriPapadopoulos
Copy link
Contributor

@DimitriPapadopoulos DimitriPapadopoulos commented Sep 20, 2022

Summary

https://mathworks.com/help/compiler/isdeployed.html

The path of a deployed application is fixed at compile time and cannot change. Use isdeployed to ensure that the application uses path modifying functions, such as addpath, before deployment.

As suggested by @servoz, this fixes the case where nipype calls SPM12 Standalone, associated to Matlab Compiler Runtime (MCR) R2019a (9.6) or later. Upcoming versions of SPM12 Standalone will most probably be compiled with Matlab R2021b, and hence will be subject to this bug.

Fixes #3507.

List of changes proposed in this PR (pull-request)

  • Do not call addpath in Matlab scripts called from a deployed Matlab application.

@DimitriPapadopoulos DimitriPapadopoulos changed the title FIX: Deployed Matllab applications must not call addpath() FIX: Deployed Matlab applications must not call addpath() Sep 20, 2022
https://mathworks.com/help/compiler/isdeployed.html

	The path of a deployed application is fixed at compile time
	and cannot change. Use isdeployed to ensure that the application
	uses path modifying functions, such as addpath, before deployment.

This fixes the case where nipype calls SPM12 Standalone, associated
to Matlab Compiler Runtime (MCR) R2019a (9.6) or later. Upcoming versions
of SPM12 Standalone will most probably be compiled with Matlab R2021b,
and hence will be subject to this bug.
@codecov
Copy link

codecov bot commented Sep 20, 2022

Codecov Report

Base: 65.26% // Head: 65.26% // No change to project coverage 👍

Coverage data is based on head (a101d24) compared to base (8f405f6).
Patch coverage: 0.00% of modified lines in pull request are covered.

❗ Current head a101d24 differs from pull request most recent head 72fa3bf. Consider uploading reports for the commit 72fa3bf to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3509   +/-   ##
=======================================
  Coverage   65.26%   65.26%           
=======================================
  Files         309      309           
  Lines       40870    40870           
  Branches     5380     5380           
=======================================
  Hits        26672    26672           
  Misses      13124    13124           
  Partials     1074     1074           
Flag Coverage Δ
unittests 65.04% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
nipype/interfaces/matlab.py 78.02% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@effigies effigies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Small suggestion.

Co-authored-by: Chris Markiewicz <effigies@gmail.com>
@effigies effigies merged commit eb779e6 into nipy:master Sep 20, 2022
@DimitriPapadopoulos DimitriPapadopoulos deleted the spm12_standalone branch September 20, 2022 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants